package bma.common.langutil.ai.vm;

public class AIContextThread implements AIContext {

	protected final AIThread thread;

	public AIContextThread(AIThread thread) {
		super();
		this.thread = thread;
	}

	public static AIContext create() {
		AIThread t = AIVM.currentThread();
		if(t!=null)return new AIContextThread(t);
		return null;
	}

	@Override
	public void execute(Runnable command) {
		thread.execute(command);
	}
}
